<?php
class StopCard extends BaseCard
{
	function StopCard($color)
	{
		$this->color = $color;
		$this->type = Stop;
	}

	function equal($state)
	{
		return $this->color == $state->color || $this->type == $state->type || ($state->punished && $state->type == $this->type) ;
	}

	function overlay($state)
	{
		$state->punished = false;
		
		$state->color = $this->color;
		$state->step += $this->step;
		$state->type = $this->type;
	}
}